package com.example.tossednfound;

import java.util.ArrayList;

import android.test.ActivityInstrumentationTestCase2;

public class EmilyJUnit extends ActivityInstrumentationTestCase2 {

	public EmilyJUnit() {
		super(AdminUser.class); 
	}

	protected void setUp() throws Exception {
		super.setUp();
	}


	public void testRemoveUser(){
		AdminUser newAdmin0 = new AdminUser("Admin0@admin.com", "admin0", "323 Admin0 Way", "AL", 2434, "US", "Admin0");
		User newUser0 = new RegUser("Test0@test.com", "test0", "323 Test0 Way", "AL", 2434, "US", "Test0");
		User newUser1 = new RegUser("Test1@test.com", "test1", "323 Test1 Way", "AL", 2434, "US", "Test1");
		User newUser3 = new RegUser("Test3@test.com", "test3", "323 Test3 Way", "AL", 2434, "US", "Test3");
		
		ArrayList<RegUser> dummyUserList = new ArrayList<RegUser>();
		dummyUserList.add((RegUser) newUser0);
		dummyUserList.add((RegUser) newUser1);
		dummyUserList.add((RegUser) newUser3);
		boolean result0 = false;
		boolean result1 = false;
		
		LoginActivity.UserList = dummyUserList;
		newUser3 = null;
		result0 = newAdmin0.removeUser(newUser0);
		result1= newAdmin0.removeUser(newUser3);

		assertTrue("It removed a real user",result0);
		assertFalse("It did not remove a null user", result1);
	}
	

}


